<template>
  <div class="">
	<iw-header></iw-header>
    <!--面包屑导航-->
   
	<bread-crumb>&gt;我的购物车 </bread-crumb>
    <!--主体内容-->
    <!--页面主体-->
    <div class="main container">
        <div class="cart">
   <!--         <div class="cart_header">
                <a href="" class="cart_delete">删除</a>
                <a href="" class="cart_clear">清空购物车</a>
                <span>已选课程<em>0</em>门</span>
                <span>总金额：<strong>0.00</strong></span>
                <button type="button" class="pay">结算</button>
            </div> -->
			 <h2 @mouseenter="color1='#ff0000'" @mouseleave="color1='#0062A9'"  style="display:block;margin-left:100px;" v-if="!this.$store.state.userInfo.uid">请登录后查看您的购物车 <router-link  :style="{color:color1}"  to="/login">去登录</router-link></h2>
			
			
			<template v-else>
            <div   class="cart_con">
                <div class="cartcon_title clearfloat">
                    <span><input type="checkbox" class="checkbox_all"/> 全选</span>
                    <span>课程信息</span>
                    <span>单价</span>
                    <span>数量</span>
                    <span>金额</span>
                    <span>操作</span>
                </div>
                <div class="cartcon_list">
                    
                    <!--<h2>购物车中没有任何课程！<a href="product.html">查看全部课程</a></h2>-->
                    <!--<ul>
                        <li class="clearfloat">
                            <span><input type="checkbox" class="cart_checkbox"/></span>
                            <a href="" class="cart_img"><img src="img-course/01.png" alt=""/></a>
                            <a href="" class="cart_title">HTML5基础入门</a>
                            <i>¥1599</i>
                            <div>
                                <span>-</span><input type="text" value="2"/><span>+</span>
                            </div>
                            <strong>¥1599.00</strong>
                            <em></em>
                        </li>
                        <li class="clearfloat">
                            <span><input type="checkbox" class="cart_checkbox"/></span>
                            <a href="" class="cart_img"><img src="img-course/02.png" alt=""/></a>
                            <a href="" class="cart_title">JavaScript核心知识讲解</a>
                            <i>¥1599</i>
                            <div>
                                <span>-</span><input type="text" value="2"/><span>+</span>
                            </div>
                            <strong>¥1599.00</strong>
                            <em></em>
                        </li>
                    </ul>-->
                </div>
            </div>
            <div class="cart_header">
                <p><input type="checkbox" class="checkbox_all"/> 全选</p>
                <a href="" class="cart_delete">删除</a>
                <a href="" class="cart_clear">清空购物车</a>
                <span>已选课程<em>0</em>门</span>
                <span>总金额：<strong>0.00</strong></span>
                <button type="button" class="pay">结算</button>
            </div>
			</template>
        </div>
    </div>
	<iw-footer></iw-footer>
  </div>
</template>

<script>
import Header from '../components/Header.vue';
import Footer from '@/components/Footer.vue';
import BreadCrumb from '../components/Breadcrumb.vue'
export default {
	data:()=>{
		return { 
			color1:"#0062A9",
		}
	},
	mounted(){
		//打印加载之后用户信息
		console.log("打印加载之后用户信息",this.$store.state.userInfo.uid);
		let uid=this.$store.state.userInfo.uid;
		//如果uid存在,异步加载网页uid中的数据
		if(uid){
			//未完待续
			this.$http.get()
		}
	},
	components:{
		'iw-header':Header,
		'iw-footer':Footer,
		BreadCrumb
	}
}	
</script>

<style>
	@import url("../assets/css/mycss.css");
</style>
